Click Event (SSTab Control) Example

This example saves preferences information from two tabs of an SSTab control as soon as the user selects a different tab.

Private Sub sstbPrefs_Click(PreviousTab As Integer)
   Dim ThisSetting As String
   Select Case PreviousTab
      Case 0
         If optLoanLen(0) = True Then
            ThisSetting = "Months"
         Else
            ThisSetting = "Years"
         End If
         SaveSetting "LoanSheet", "LoanLength", _
               "Period", ThisSetting
      Case 1
         Dim X As Integer
         For X = 0 To 3
            If optPctsShown(X) = True Then
               SaveSetting "LoanSheet", "InterestRate", _
                "Precision", optPctsShown(X).Tag
               Exit For
            End If
         Next X
   End Select
End Sub